<html>
<head>
<meta http-equiv="conten-type" content="text/html;charset=utf-8"/>
</head>
<img alt="" src="./images/title.png">
<?php 
require_once 'Admin.service.class.php';

if(!empty($_COOKIE['userid'])){
    $userid=$_COOKIE['userid'];
    $adminService=new AdminService();
    $res=$adminService->getPassword($userid);
}

?>
<hr>
<h1>管理员登录系统</h1>
<form action="loginProcess.php" method="post">

<table >
<tr><td>用户id:</td><td><input type="text" name="id" value=<?php echo $userid ?>></td></tr>
<tr><td>密&nbsp;码:</td><td><input type="password" name="password"></td></tr>
<tr><td  colspan="2">是否保存用户id:<input type="checkbox" name="savecookie"></td></tr>
<tr><td><input type="submit" value="用户登录"/></td><td><input type="reset" value="重新填写"/></td></tr>
</table>
</form>
<?php 
if(isset($_GET['errorno'])){

    $errorno=$_GET['errorno'];
if($errorno==1){
    echo "<font color='red' size='3'> 用户名或密码错误</font>";
}
}

?>
<hr>
<img alt="" src="./images/end.png">
</html>